Repository navigation
Fix rounds after the work follow the supervisor: on while they make progress, never waiting on a comment - #643
Merged
Merged
Conversation
…rogress, deferred or failed with the cause, never waiting on a comment The CI-only rounds on a finished run's pull request and the self-review rounds on CoderHelm's own pull request stopped at their caps and asked for a comment naming a change. Both now take each round by supervisor::next_round: past the cap only while rounds make progress (red checks turn green, findings close), up to twice it and below the spend ceiling; a round without progress climbs the ladder; at the end the findings are deferred on the pull request and the run finishes, or red checks are reverted to green and deferred, or the run fails with what fails. The old wording is on the hand-off phrase list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two loops of fix rounds still stopped on their own budget after #635 moved every other ending onto the supervisor:
Both loops now follow the supervisor's rule (
supervisor::next_round):ownershiphand-off list, so the source scan fails if one comes back.Changes
supervisor:next_round/RoundFacts/RoundStep(progress, ceiling = twice the cap, spend ceiling, ladder),ci_progress,findings_progress,round_instruction(each rung's approach for a round;ESCALATEDmarks the strongest-model rung),end_of_rounds(the ending throughsupervisor::end: finished with what is deferred, or failed while checks are red).passes/mod.rs:claim_auto_fix_roundclaims a round with a compare-and-set onauto_fix_pushesand records the failing checks (auto_fix_failing) and the stall count (auto_fix_stalled). It returnsRound(rung),End(why)orBusy. The pure decision isauto_fix_step.claim_auto_fix_slot_uptolets a caller that already decided by the rule claim up to the ceiling.feedback: CI-only cycles, and CI fixing that rides along with a person's comment, claim rounds by the rule. The rung's instruction goes into the CI block, and the escalate rung uses the strongest model.fetch_ci_failuresalso returns the failing check names.end_auto_fix_roundsnow callsresume::end_red_ci_rounds, once per head (auto_fix_end_head), instead of completing the run and posting the comment-to-continue note.run_ticket_messagebuilds the run's ticket message, which was previously inlined.resume: newend_red_ci_rounds(revert to green and await CI; else write the failing-checks section, run the ready decision, and fail the run with the cause). The own-review loop uses the newown_review::next. AFixround carries the rung's instruction, and the escalate rung runs the fix on thecomplexmodel. The stop-judge licence no longer gates rounds that make progress.stop_on_own_findingsis replaced byfinish_on_own_findings: it defers the findings on the pull request, runs the ready decision, then ends throughwait_for_review/wait_on_personas completed, or as failed while checks are red. Queued rounds for a finished run use the ceilings in their claim, and a run whose rounds are over returnsOwnRound::Defer.own_review:next(..., spent_usd)returnsReady,Fix { stalled, rung }orFinish { why }. New:finish_reason,defer_findings,rounds_over(progress fromopen_before/open_nowonRoundBudget).stop_reasonandcap_reasonare removed.ready:fix_own_findingsdefers the findings on the pull request when the run's rounds are over, instead of holding them for a person.review_pr:claim_self_review_roundis a compare-and-set by the rule (self_review_step). It records the rounds, the findings open at the last round and the stall count. A round's feedback carries the rung's instruction. When the rounds end,end_self_review_roundsdefers the findings on the pull request, posts one note saying what was deferred and why, and asks the ready decision.e2e: E2E failures sent back to a finished run use the same rounds. When the rounds end, the note lists what still fails and why the rounds ended, without a comment-to-continue line.ownership: the comment-to-continue phrases ("comment to continue", "comment naming a change", "naming a change starts", "starts the next round/one right away", "stop(s) starting rounds") are added toHAND_OFF_PHRASES.ae_budget_rounds, with a row indocs/incidents.md.k_own_review_findings,aa_promised_roundandp_finished_work_loopare updated for the new endings and names.Verification
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: common 2079 passed, gateway 902 passed, worker 1602 passed, 2 passed in a small binary; nothing failed.incidents::ae_budget_rounds):Failed, and the cause names the checks, the error and why the rounds ended, with no hand-off phrase. Past the cap a round without progress ends the rounds, and so does nearing the spend ceiling.mainwith only the new phrase list and the source-scan test fails bothownership::no_prompt_or_message_hands_work_back(it flags the old notes infeedback.rs,review_pr.rsande2e.rs) andae_budget_rounds::neither_loop_ends_by_waiting_on_a_comment.auto_fix_stepandself_review_stepswitched back to the old cap rule (a round only while under the cap) fails all four replays.